home *** CD-ROM | disk | FTP | other *** search
Java Source | 2000-11-10 | 964 b | 31 lines |
- //import ImageButton;
- import java.awt.Event;
- import symantec.itools.awt.ImageButton;
- /*
- mImageButton RHM@1997 used to override the mouseDown, capturing the right click and
- posting it as META (right click) and passing left mouse click on to ImageButton.
- This is used so that events come seperately from left and right mouse actions.
- */
- public class mImageButton extends symantec.itools.awt.ImageButton
- {
- public mImageButton()
- { super();
- }
-
- // Override mouse down to post META Key (right mouse) as seperate from left mouse down
- public boolean mouseDown(java.awt.Event e, int x, int y)
- {
- boolean ret;
- if (e.modifiers != java.awt.Event.META_MASK)
- ret = super.mouseDown(e, x, y);
- else
- { e.id = Event.ACTION_EVENT; // change to ACTION event
- ret = postEvent(e);
- }
- return ret;
- }
-
-
- }
-
-